package com.wb3.meta.task;

import com.wb3.meta.api.core.service.MyToysService;
import com.wb3.meta.common.authentication.RequestHolder;
import com.wb3.meta.config.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling    //开启定时任务
public class UpdateToysPowerTask {

    @Autowired
    private MyToysService myToysService;

    @Scheduled(cron = "0 0 6 * * ?")
//    @Scheduled(fixedDelay = 1000 * 60)
    public void handleToysPower(){
        myToysService.handleToysPower();
    }
}
